package com.d0309;

public class Human {
    public void foo(Human human){
        if(human instanceof Men){
            System.out.println("男");
        }else{
            System.out.println("女");
        }

    }

    public static void main(String[] args) {
        Human human = new Men();
        human.foo(human);
    }
}

class Men extends Human{

}

class Women extends Human{

}